import { GSprite } from "../../../com/mui/controls/GSprite";
import { IUIView } from "../interfaces/IUIView";
import { ILayer } from "../interfaces/ILayer";
import { ViewEvent } from "../events/ViewEvent";
type int = number;
//class View
    
    export  class View extends GSprite implements IUIView
    {
       

        public get isHide(): Boolean
        {
            return this._isHide;
        }

        public set layer(arg1: ILayer)
        {
            this._layer = arg1;
            return;
        }

        public get layer(): ILayer
        {
            return this._layer;
        }

        public update(arg1: Object, ... rest): void
        {
            if (typeof !(arg1 === "int")) 
            {
                if (typeof !(arg1 === "number")) 
                {
                };
            }
            return;
        }

        public hide(): void
        {
            if (this._layer) 
            {
                this._isHide = true;
                dispatchEvent(new ViewEvent(ViewEvent.Hide));
                this._layer.removePopup(this);
            }
            return;
        }

        public show(arg1: int=0, arg2: int=0): void
        {
            if (this._layer) 
            {
                this._isHide = false;
                this._layer.addPopUp(this);
                dispatchEvent(new ViewEvent(ViewEvent.Show));
                if (!(arg1 == 0) && !(arg2 == 0)) 
                {
                    this._layer.setPosition(this, arg1, arg2);
                }
            }
            return;
        }

        protected /* var */_layer: ILayer;

        protected /* var */_isHide: Boolean=true;
    }
